package com.starrk.myblog.foreground.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown=true)
public class SystemResult {

    private Integer status;
    private String message;
    private Object data;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static SystemResult isOk(){
        return new SystemResult(200,"Ojbk",null);

    }
    public static SystemResult isOk(Object data){
        return  new SystemResult(200,"Ojbk",data);

    }

    public static SystemResult build(Integer status,String message){
        return new SystemResult(status,message,null);
    }

    public SystemResult(Integer status,String message,Object data){
        this.status = status;
        this.message = message;
        this.data = data;
    }
}
